require(["core", "jQuery", "coAjax", "hash_routie", "queryString", "href", "eventManager", "versionManage", "appConfigAdmin"], function(jSouper, $, coAjax, hash_routie, QueryString, href, eventManager, versionManage) {
	function _refresh_domain_list(argument) {
		coAjax.get(appConfig.admin.domain_list, function(result) {
			App.set("$Cache.admin.busdomain.domain_list", result.result.reverse());
		});
	};
	hash_routie.on("busdomain", _refresh_domain_list);
	App.set("$Event.admin.busdomain.add_domain", function() {
		coAjax.post(appConfig.admin.add_domain, App.get("$Cache.admin.busdomain.new_domain"), function() {
			alert("添加成功");
			_refresh_domain_list();
		})
	});
	App.set("$Event.admin.busdomain.remove_domain", function(e, vm) {
		coAjax["delete"](appConfig.admin.remove_domain + vm.get("_id"), function() {
			alert("删除成功");
			_refresh_domain_list();
		})
	});
});